package com.Trainer.FirstInterface;

import javax.swing.*;
import java.awt.*;

public class IndexUpPanel extends JPanel {
    //属性
    JLabel title;

    //构造器
    public IndexUpPanel(int x, int y, int weight, int height){
        title = new JLabel("100以内的加减法练习器");

        //事件

        //布局
        setLayout(null);
        setBounds(x,y,weight,height);
        add(title);
        //标签修饰
        title.setHorizontalAlignment(SwingConstants.CENTER);
        title.setFont(new Font("黑体",Font.PLAIN,32));
        title.setBounds(0,0,900,100);
        title.setOpaque(true);
        //test
        System.out.println("2");
    }
}
